	 var Stacks = {
   	      stack_top_right: {
   	        "dir1": "down",
   	        "dir2": "left",
   	        "push": "top",
   	        "spacing1": 10,
   	        "spacing2": 10
   	      },
   	      stack_top_left: {
   	        "dir1": "down",
   	        "dir2": "right",
   	        "push": "top",
   	        "spacing1": 10,
   	        "spacing2": 10
   	      },
   	      stack_bottom_left: {
   	        "dir1": "right",
   	        "dir2": "up",
   	        "push": "top",
   	        "spacing1": 10,
   	        "spacing2": 10
   	      },
   	      stack_bottom_right: {
   	        "dir1": "left",
   	        "dir2": "up",
   	        "push": "top",
   	        "spacing1": 10,
   	        "spacing2": 10
   	      },
   	      stack_bar_top: {
   	        "dir1": "down",
   	        "dir2": "right",
   	        "push": "top",
   	        "spacing1": 0,
   	        "spacing2": 0
   	      },
   	      stack_bar_bottom: {
   	        "dir1": "up",
   	        "dir2": "right",
   	        "spacing1": 0,
   	        "spacing2": 0
   	      },
   	      stack_context: {
   	        "dir1": "down",
   	        "dir2": "left",
   	        "context": $("#stack-context")
   	      },
   	    }
	 

     // We modify the width option if the selected stack is a fullwidth style
     function findWidth(noteStack) {
       if (noteStack == "stack_bar_top") {
         return "100%";
       }
       if (noteStack == "stack_bar_bottom") {
         return "70%";
       } else {
         return "290px";
       }
     }

     var notify = function(title,text,noteStyle,noteShadow,noteOpacity,noteStack){
    	 // If notification stack or opacity is not defined set a default
    	 var noteStyle = noteStyle ? noteStyle : "alert";//light,dark,primary,success,info,warning,danger,alert,system
    	 var noteShadow = noteShadow ? noteShadow:false;
         var noteStack = noteStack ? noteStack : "stack_top_right";
         var noteOpacity = noteOpacity ? noteOpacity : "1";
    	// Create new Notification
         new PNotify({
           title: title,
           text: text,
           shadow: noteShadow,
           opacity: noteOpacity,
           addclass: noteStack,
           type: noteStyle,
           stack: Stacks[noteStack],
           width: findWidth(noteStack),
           delay: 1400
         });
     }
